package com.turbotrade.enums;


public enum UserRole {
	
	CONSUMER{
		public  UserPrivileges[] getPrivileges(){
			return  new UserPrivileges[]{UserPrivileges.CREATE_TENDER, 
										 UserPrivileges.FINALIZE_BID, 
										 UserPrivileges.CREATE_PRODUCT_REQUEST};
			}
	},
	PRODUCER {
		@Override
		public UserPrivileges[] getPrivileges() {
			
			return  new UserPrivileges[]{UserPrivileges.CREATE_BID, 
									     UserPrivileges.PUBLISH_PRODUCT};
		}
	},
	TRADER{
		@Override
		public UserPrivileges[] getPrivileges() {
			return new UserPrivileges[]{UserPrivileges.CREATE_BID, UserPrivileges.PUBLISH_PRODUCT,
										UserPrivileges.CREATE_TENDER,  UserPrivileges.FINALIZE_BID, 
										UserPrivileges.CREATE_PRODUCT_REQUEST					
			};
		}
	};

	public abstract UserPrivileges[] getPrivileges();
}
